package com.zidian.leader.activity;

import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.view.ViewPager;

import com.zidian.leader.R;
import com.zidian.leader.adapter.ColleagueEvaPagerAdapter;
import com.zidian.leader.common.activity.MySwipeBackActivity;

import butterknife.Bind;

/**
 * 同行/督导评价
 * Created by GongCheng on 2017/1/12.
 */

public class ColleagueEvaluationActivity extends MySwipeBackActivity {
    @Bind(R.id.colleague_eva_tl)
    TabLayout colleagueEvaTl;
    @Bind(R.id.colleague_eva_vp)
    ViewPager colleagueEvaVp;

    private String collegeName;

    @Override
    protected int getLayout() {
        return R.layout.activity_colleague_evaluation;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        collegeName = getIntent().getStringExtra("collegeName");
        initView();
    }

    private void initView() {
        //Toolbar
        actionBar.setHomeAsUpIndicator(R.drawable.ic_arrow_back_24dp);
        actionBar.setDisplayShowTitleEnabled(false);
        ColleagueEvaPagerAdapter pagerAdapter = new ColleagueEvaPagerAdapter(getSupportFragmentManager(), this, collegeName);
        colleagueEvaVp.setAdapter(pagerAdapter);
        colleagueEvaTl.setupWithViewPager(colleagueEvaVp);
    }

}
